<template>
  <div class="wrapper">
    <el-input type="text" v-model="state.keyword" :placeholder="state.placeholder"></el-input>
    <el-button size="small" type="primary" @click="searchBtn()"
      >查询</el-button>
  </div>
</template>

<script>
import {reactive} from 'vue';
export default {
  props: {
      msg:{
          type:String,
          default:''
      },
      placeholder:{
          type:String
      }
  },
  setup(props,{emit}){
      const state=reactive({
        keyword:props.msg,
        placeholder:props.placeholder
      })
      function searchBtn(){
            emit('searchClick',state.keyword)
      }
      return {
          state,
        searchBtn
      }
  },
};
</script>
<style lang="scss" scoped>
.wrapper {
    display: flex;
    align-items: center;
}
</style>